import request from '@/utils/request'
import type { loginFormInt } from './types'

/**
 * 登录接口
 */
const basePre = '/api'
export function loginApi(data: loginFormInt) {
  return request({
    url: basePre + '/user/login',
    method: 'post',
    data
  })
}

/**
 * token登录接口
 */
// export function tokenLoginApi(data: loginFormInt) {
//   return request({
//     url: '/login',
//     method: 'post',
//     data
//   })
// }


/**
 * 获取用户信息
 */
export function getLoginUserApi(data: loginFormInt) {
  return request({
    url: '/backend/user/getLogin',
    method: 'post',
    data
  })
}
